package com.example.demospringmybatisplus.processors;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.demospringmybatisplus.mapper.NodeAutoMapper;
import com.example.demospringmybatisplus.vo.BaseDataVo;
import com.example.demospringmybatisplus.vo.NodeAutoVo;
import com.example.demospringmybatisplus.vo.SearchVo;

/**
 * node_auto业务处理类
 *
 * @DATE 2024/5/3
 **/
@Service
public class NodeAutoProcessorService extends AbstractDataProcessor{
    @Autowired
    private NodeAutoMapper nodeAutoMapper;
    @Override
    protected List<? extends BaseDataVo> findPagedList(SearchVo searchVo, String tableName) {
        QueryWrapper<NodeAutoVo> nodeAutoVoQueryWrapper = new QueryWrapper<>();
        nodeAutoVoQueryWrapper.eq("esn",searchVo.getEsn());
        nodeAutoVoQueryWrapper.eq("name",searchVo.getName());
        return nodeAutoMapper.selectList(nodeAutoVoQueryWrapper);
    }
}
